.galleryContainer {
  padding: 20px;
  background: #fff;
  min-height: 400px;

  :global {
    .ant-spin-nested-loading {
      width: 100%;
    }

    .ant-list-pagination {
      text-align: center;
      margin-top: 24px;
    }

    .ant-empty {
      padding: 40px 0;
    }

    .ant-image {
      width: 100%;
      display: block;
    }
  }
}

.artworkItem {
  transition: all 0.3s ease;

  &:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
}

.artworkCard {
  width: 100%;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #f0f0f0;
}

.imageWrapper {
  position: relative;
  width: 100%;
  padding-bottom: 100%; // 1:1 宽高比
  overflow: hidden;

  .artworkImage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;

    &:hover {
      transform: scale(1.05);
    }
  }
}

.artworkInfo {
  padding: 16px;
}

.title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 500;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.description {
  margin: 0 0 12px;
  font-size: 14px;
  color: #666;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
  height: 42px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;

  :global {
    .ant-tag {
      margin: 0;
      border-radius: 4px;
      font-size: 12px;
      padding: 0 8px;
      line-height: 20px;
      background: #f5f5f5;
      border: none;
      color: #666;

      &:hover {
        background: #e6f7ff;
        color: #1890ff;
      }
    }
  }
}

// 响应式布局
@media screen and (max-width: 576px) {
  .galleryContainer {
    padding: 12px;
  }

  .artworkInfo {
    padding: 12px;
  }

  .title {
    font-size: 14px;
  }

  .description {
    font-size: 12px;
    height: 36px;
  }
}

// 加载动画
.loadingPlaceholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 50%, #f2f2f2 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

// 暗色主题适配
@media (prefers-color-scheme: dark) {
  .galleryContainer {
    background: #1f1f1f;
  }

  .artworkCard {
    background: #262626;
    border-color: #434343;
  }

  .title {
    color: #fff;
  }

  .description {
    color: #999;
  }

  .tags {
    :global {
      .ant-tag {
        background: #2f2f2f;
        color: #999;

        &:hover {
          background: #177ddc;
          color: #fff;
        }
      }
    }
  }

  .loadingPlaceholder {
    background: linear-gradient(90deg, #2f2f2f 25%, #262626 50%, #2f2f2f 75%);
  }
}